﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.CustomerShippingAddressControl"
    CodeBehind="CustomerShippingAddress.ascx.cs" %>
<%@ Register TagPrefix="nopCommerce" TagName="ShippingAddressDisplay" Src="~/Modules/ShippingAddressDisplay.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="ShippingAddressEdit" Src="~/Modules/ShippingAddressEdit.ascx" %>

<div class="customer-ShippingAddress">
    <div class="add-button">
      <asp:PlaceHolder ID="phAddButton" runat="server">
        <asp:Button ID="btnAdd" OnClick="btnAdd_Click" runat="server" Text="" CssClass="addshippingaddressbutton" />
      </asp:PlaceHolder>
    </div>
    <div class="clear">
    </div>
    <div>
      <asp:PlaceHolder ID="phCard" runat="server">
        <nopCommerce:ShippingAddressEdit ID="ShippingAddressEditCtrl" runat="server" />
      </asp:PlaceHolder>
    </div>
    <div style="margin-bottom: 5px;	margin-top: 5px;	float: right; text-align: right;">
      <asp:PlaceHolder ID="phSaveButton" runat="server">
        <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="" CssClass="savebutton" ValidationGroup="CustomerShippingAddress" />
        &nbsp;
        <asp:Button ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="" CssClass="cancelbutton" CausesValidation="false" />
      </asp:PlaceHolder>
    </div>
    <div class="clear">
    </div>
    <div class="address-list">
        <table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td>
              &nbsp;
            </td>
          </tr>
          <tr>
            <td class="title2">
              Список адресов для доставки
            </td>
          </tr>
          <tr>
            <td>
              &nbsp;
            </td>
          </tr>
          <tr>
            <td class="red1">
              Пожалуйста выберите адрес для доставки Ваших заказов или удалите адрес из данного списка.
            </td>
          </tr>
        </table>
        <asp:Repeater ID="rptrShippingAddress" runat="server" 
          onitemdatabound="rptrShippingAddress_ItemDataBound">
            <ItemTemplate>
                <div class="address-item">
                    <nopCommerce:ShippingAddressDisplay ID="ShippingAddressDisplayCtrl" runat="server" ShippingAddress='<%# Container.DataItem %>'
                        ShowEditButton="true" ShowDeleteButton="true" />
                </div>
            </ItemTemplate>
            <SeparatorTemplate>
                <div class="clear">
                </div>
            </SeparatorTemplate>
        </asp:Repeater>
    </div>
    <div class="clear">
    </div>
</div>
